Skip to content

feat: secure live2d ai chat endpoint#73

Merged
LIlGG merged 1 commit into
mainfrom
feat/secure-ai-agent
Jun 17, 2026
Merged

feat: secure live2d ai chat endpoint#73
LIlGG merged 1 commit into
mainfrom
feat/secure-ai-agent

Conversation

@LIlGG

@LIlGG LIlGG commented Jun 17, 2026

Copy link
Copy Markdown
Owner

What this PR does / why we need it:

为 Live2D AI 聊天接口增加入口级安全防护,降低匿名恶意调用 AI 或 Agent 能力的风险。

主要改动:

  • 增加 AI 聊天防盗链校验,基于 Origin、Referer 和 Sec-Fetch-Site 拦截跨站调用。
  • 使用 Halo 提供的 RateLimiterRegistry 为 AI 聊天和 Agent 调用增加按用户/IP 的限流能力,并在插件停用时清理 limiter。
  • 将 AI 聊天设置拆分为聊天基本设置、聊天体验设置和接口安全策略,避免所有选项挤在一个 group 内。
  • 补充安全服务和配置解析单元测试。

Does this PR introduce a user-facing change?

为 Live2D AI 聊天增加防盗链、限流和独立的接口安全配置。

@LIlGG LIlGG marked this pull request as ready for review June 17, 2026 07:26
@LIlGG LIlGG force-pushed the feat/secure-ai-agent branch from 6319752 to 999c139 Compare June 17, 2026 07:36
@LIlGG LIlGG merged commit febcf94 into main Jun 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant